home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iifvddir.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  6.3 KB  |  265 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5.  
  6. <% if Session("FONTSIZE") = "" then %>
  7.     <!--#include file="iito.inc"-->
  8. <% else %>
  9.     <!--#include file="iifvddir.str"-->
  10. <% 
  11.  
  12. On Error Resume Next 
  13.  
  14. Dim path, currentobj, spath, instobj
  15.  
  16. path=UCase(Session("dpath"))
  17.  
  18. spath=UCase(Session("spath"))
  19.  
  20. if spath = "" then
  21.     spath = Mid(path,1,InStr(path,"/ROOT")-1)
  22.     Session("spath")=spath
  23. end if
  24.  
  25. Set currentobj=GetObject(path)
  26. Set instobj=GetObject(spath)
  27.  
  28. Session("SpecObj")=spath
  29. Session("SpecProps")="MSDosDirOutput"
  30.  
  31. function writeFSPath(fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
  32.     On Error Resume Next
  33.     Dim thispath, fspath, parenttype, parentobj
  34.     if Session("vtype") = "dir" then
  35.         thispath = Session("dpath")
  36.         fspath = ""
  37.         parenttype = ""
  38.         Do Until Instr(parenttype, "VirtualDir") <> 0
  39.             'we need clear our path not found error..
  40.             err = 0                        
  41.             'add our initial whack...
  42.             fspath = "/" + fspath
  43.             
  44.             'and cyle through the baseobj till we find the next whack,
  45.             'building up the path in new name as we go
  46.             Do Until Right(thispath,1) = "/"
  47.                 fspath = Right(thispath,1) & fspath
  48.                 thispath = Mid(thispath,1,Len(thispath)-1)
  49.             Loop
  50.             
  51.             'once we're out, we need to lop off the last whack...
  52.             thispath = Mid(thispath,1,Len(thispath)-1)
  53.             
  54.             'and try to set the object again...
  55.             Set parentobj=GetObject(thispath)
  56.             
  57.             if err <> 0 then            
  58.                 parenttype = ""
  59.             else
  60.                 parenttype=parentobj.KeyType
  61.             end if                             
  62.         Loop
  63.         fspath = parentobj.Path & "\" & Replace(fspath,"/","\")
  64.         writeFSPath = fspath    
  65.     else
  66.         writeFSPath = text("Path",fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
  67.     end if            
  68.  
  69. end function
  70.  
  71.  %>
  72.  
  73. <!--#include file="iiset.inc"-->
  74. <!--#include file="iisetfnt.inc"-->
  75. <HTML>
  76. <HEAD>
  77. <TITLE></TITLE>
  78. <SCRIPT LANGUAGE="JavaScript">
  79.  
  80.     <% if Session("vtype") = "svc" or Session ("vtype") = "server" then %>
  81.             top.title.Global.helpFileName="iipz_5";    
  82.     <% else %>
  83.             top.title.Global.helpFileName="iipz_3";        
  84.     <% end if %>
  85.     
  86.     var Global=top.title.Global;
  87.  
  88.     <!--#include file="iijsfuncs.inc"-->
  89.     
  90.     function disableDefault(dir,fromCntrl, toCntrl){
  91.         if (!dir){
  92.             if (fromCntrl.value !=""){
  93.                 toCntrl.value=fromCntrl.value;
  94.                 fromCntrl.value="";
  95.             }
  96.         }
  97.         else{
  98.             if (toCntrl.value !=""){
  99.                 fromCntrl.value=toCntrl.value;
  100.                 toCntrl.value="";
  101.             }
  102.         }
  103.     }
  104.  
  105.     function enableDefault(chkCntrl){
  106.         chkCntrl.checked=true;
  107.     }
  108.     
  109.     function setLog(chkCntrl){
  110.         if (chkCntrl.checked){
  111.             document.userform.DontLog.value = "False";
  112.         }
  113.         else{
  114.             document.userform.DontLog.value = "True";                
  115.         }
  116.         
  117.     }    
  118.  
  119.     function SetBool(){
  120.         if (document.userform.rdohdnMSDOSDirOutput[0].checked){
  121.             document.userform.MSDOSDirOutput.value="False"
  122.         }
  123.         else{
  124.             document.userform.MSDOSDirOutput.value="True"
  125.         }
  126.     }
  127.  
  128.  
  129.     function listFuncs(){
  130.         this.writeList=buildListForm;
  131.     }
  132.  
  133.     function buildListForm(){
  134.         <% if Session("vtype") <> "dir" then %>
  135.         //if (document.userform.Path.value !="<%= currentobj.path %>"){
  136.             //top.title.nodeList[0].deCache();
  137.         //}
  138.         <% end if %>
  139.     }
  140.     
  141.     function chkPath(pathCntrl){
  142.         if (pathCntrl.value != ""){
  143.             top.connect.location.href = "iichkpath.asp?path=" + escape(pathCntrl.value);            
  144.         }
  145.     }    
  146.  
  147.  
  148.     listFunc=new listFuncs();
  149.  
  150.  
  151. </SCRIPT>
  152.  
  153. <% if Session("canBrowse") then %>
  154. <SCRIPT SRC="JSDirBrowser/JSBrowser.js">
  155. </SCRIPT>
  156.  
  157. <SCRIPT LANGUAGE="JavaScript">
  158.     JSBrowser = new BrowserObj(null,false,TDIR,<%= Session("FONTSIZE") %>);
  159.     
  160.     function setPath(cntrl){
  161.         JSBrowser = new BrowserObj(cntrl,POP,TDIR,<%= Session("FONTSIZE") %>)
  162.     }
  163. </SCRIPT>
  164.  
  165. <% end if %>
  166. </HEAD>
  167.  
  168. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF"  >
  169.  
  170. <%= sFont("","","",True) %>
  171. <HR>
  172. <FORM NAME="userform" onSubmit="return false">
  173. <TABLE BORDER=0 CELLPADDING=0>
  174. <TR>
  175.     <TD VALIGN="middle">
  176.         <%= sFont("","","",True) %>
  177.             <%= L_PATH_TEXT %>
  178.         </FONT>
  179.     </TD>
  180.     <TD VALIGN="middle">
  181.         <%= sFont("","","",True) %>
  182.         <%= writeFSPath(45,"chkPath(this);","","",false,true) %>  
  183.         </FONT>
  184.     </TD>
  185.     <TD>
  186.         <%= sFont("","","",True) %>  
  187.     <% if Session("canBrowse") then %>
  188.         <% if Session("IsAdmin") then %>
  189.             <% if Session("vtype") <> "dir" then %>
  190.                 <INPUT TYPE="button" NAME="hdnBrowser" VALUE="<%= L_BROWSE_TEXT %>" OnClick="setPath(document.userform.Path);">
  191.             <% end if %>
  192.         <% end if %>
  193.     <% end if %>
  194.     </FONT>
  195.     </TD>
  196. </TR>
  197. <TR HEIGHT= 4>
  198.     <TD> 
  199.     </TD>
  200. </TR>
  201. <TR>
  202.     <TD COLSPAN=3>
  203.                     <%= sFont("","","",True) %>                    
  204.                         <%= checkbox("AccessRead","",false) %> <%= L_READ_TEXT %><BR>
  205.                         <%= checkbox("AccessWrite","",false) %> <%= L_WRITE_TEXT %><BR>
  206.                         
  207.                         <% if currentobj.DontLog then %>
  208.                             <INPUT TYPE="checkbox" NAME="hdnDontLog" OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>                            
  209.                             <INPUT TYPE="hidden" NAME="DontLog" VALUE="True">                            
  210.                         <% else %>
  211.                             <INPUT TYPE="checkbox" NAME="hdnDontLog" CHECKED  OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>
  212.                             <INPUT TYPE="hidden" NAME="DontLog" VALUE="False">                            
  213.                         <% end if %>
  214.                         
  215.                     </FONT>
  216.     </TD>
  217. </TR>
  218. </TABLE>
  219.  
  220. <% if Session("vtype") = "svc" or Session("vtype") = "server" then%>
  221.  
  222. <!-- set the current object = to the instance level object for MSDOSDirOutput -->
  223.  
  224. <P>
  225. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  226. <%= L_DIRECTORYSTYLE_TEXT %>
  227. <IMG SRC="images/hr.gif" WIDTH=350 HEIGHT=2 BORDER=0 ALIGN="middle">
  228. <P>
  229. <TABLE BORDER=0 CELLPADDING=0 WIDTH = 200>
  230. <TR>
  231.     <TD COLSPAN=3>
  232.         <%= sFont("","","",True) %>
  233.             <%= printradio("hdnMSDOSDirOutput", not instobj.MSDOSDirOutput, "SetBool();",false) %>
  234.              
  235.             <%= L_UNIX_TEXT %>®
  236.         </FONT>
  237.     </TD>
  238. </TR>
  239. <TR>
  240.     <TD COLSPAN=3>
  241.         <%= sFont("","","",True) %>
  242.             <%= printradio("hdnMSDOSDirOutput", instobj.MSDOSDirOutput, "SetBool();",false) %>
  243.              
  244.             <%= L_MSDOS_TEXT %>®
  245.             <% if instobj.MSDOSDirOutput then %>
  246.                 <INPUT TYPE="hidden" NAME="MSDOSDirOutput" VALUE="True">
  247.             <% else %>
  248.                 <INPUT TYPE="hidden" NAME="MSDOSDirOutput" VALUE="False">
  249.             <% end if %>
  250.         </FONT>
  251.     </TD>
  252. </TR>
  253. </TABLE>
  254. <% end if %>
  255. </FORM>
  256. </BLOCKQUOTE>
  257. </FONT>
  258. </BODY>
  259.  
  260. </HTML>
  261.  
  262. <%end if %>
  263.  
  264.  
  265.